package com.veketor;



public class TempOsMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		tools.sethPaths();
		ProductSet listaProductos = new ProductSet();
		String className = "main";
		
		//Product productos = new Product();
		
		try
		{
			Debug.on();
			Debug.setLevel(6);
			Debug.out(className+" isWindowsBased?: "+tools.isWindows());
			DbManager.connect(Negocio.dbPath);

			Debug.out(6,"Inicio tempOs");
			//DbManager.updTable("Insert into PRODUCTS Values('location01',12.0,NULL,'autoincrementado2',10,0,0,'/aqui','hoy')");
			DbManager.updTable("Insert into SIMPLE Values (NULL,'Colacao')");
			listaProductos.createTable();
			Product tempProduct;
			listaProductos.loadTable();
			tempProduct = new Product("cafe",1.9);
			//Debug.out("Existe el producto?: "+tempProduct.isInDataBase());
			tempProduct = listaProductos.getProductbyIndex(1);
			Debug.out(className+" Producto: "+tempProduct.toStringDB(false));
			Debug.out("ID: "+tempProduct.getIdFromDataBase());
			//tempProduct = listaProductos.getProductbyIndex(0);
			
			
			//tempProduct.toDataBase();
			DbManager.close();
			Debug.out("Fin tempOs");
		}
		catch(Exception e)
		{
			Debug.out(className+ ":");
		}
	}
}
